<extend file='resource/view/admin'/>
<block name="content">
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><h3>图片列表</h3></li>
    </ul>
    <br>
    <table class="table table-hover table-striped">
        <thead>
        <tr>
            <th width="8%">编号</th>
            <th>图片标题</th>
            <th>图片预览</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        <foreach from="$field" value="$d">
            <tr>
                <td>{{$d['slide_id']}}</td>
                <td>{{$d['slide_title']}}</td>
                <td>
                    <img src="{{$d['slide_thumb']}}" style="height: 50px" alt="">
                </td>
                <td class="btn-group ">
                    <a href="{{u('post',['slide_id'=>$d['slide_id']])}}" class="btn btn-success">编辑</a>
                    <a href="javascript:;" onclick="remove({{$d['slide_id']}})" class="btn btn-danger">删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    {{$field->links()}}
    <script>
        function remove(slide_id) {
            util.confirm('确定删除吗?', function (res) {
                location.href = "{{u('remove')}}&slide_id=" + slide_id;
            })
        }
    </script>
</block>